<?php

/**
 * res.php
 *
 * @author: cnx7 <zysafe@live.cn> 2016-04-13
 */
class res
{
    /**
     * @param $api
     * @return string
     */
    static function get($api)
    {
        switch ($api) {
            case "WeOpen.Login":
                return <<<T_ECHO
{
    "ret": 200,
    "data": {
        "code": 1,
        "context": "操作成功！",
        "data": {
            "id": "4",
            "nickName": "运动迷",
            "pwd1": "e10adc3949ba59abbe56e057f20f883e",
            "pwd2": "",
            "phone": "18975137814",
            "identityCard": "",
            "realName": "",
            "photo": "",
            "birthday": "",
            "userIntroduce": "",
            "userAddress": "",
            "sex": "0",
            "deviceId": "",
            "lastIp": "",
            "wxOpenid": "",
            "qqOpenid": "",
            "sinaOpenid": "",
            "pushClientid": "",
            "status": "1",
            "updateTime": "2018-01-02 17:40:02",
            "createTime": "2018-01-02 17:40:02",
            "accessToken": "0bb55ffa0ad4349ae2ef3628396e9867"
        }
    },
    "msg": ""
}
T_ECHO;
                break;
            case "WeOpen.BannerList":
                return <<<T_ECHO
{
    "ret": 200,
    "data": {
        "code": 1,
        "context": "操作成功！",
        "data": [
            {
                "id": "1",
                "imgUrl": "http://img.taopic.com/uploads/allimg/121019/234917-121019231h258.jpg",  //轮换板链接
                "url": "www.baidu.com", //type 3 跳转地址 ，2和1是主键id用来请求数据
                "type": "3", //1 打开咨询 2打开比赛 3打开 网页
                "top": "0", 
                "status": "1",
                "updateTime": "2017-12-27 17:21:41",
                "createTime": "2017-12-27 17:21:35"
            },
            {
                "id": "2",
                "imgUrl": "http://pic6.nipic.com/20100309/4415972_185745011462_2.jpg",
                "url": "www.baidu.com",
                "type": "3",
                "top": "0",
                "status": "1",
                "updateTime": "2017-12-27 17:22:27",
                "createTime": "2017-12-27 17:22:24"
            },
            {
                "id": "3",
                "imgUrl": "http://pic.35pic.com/normal/08/69/21/432252_183231322000_2.jpg",
                "url": "www.baidu.com",
                "type": "3",
                "top": "0",
                "status": "1",
                "updateTime": "2017-12-27 17:22:56",
                "createTime": "2017-12-27 17:22:53"
            }
        ]
    },
    "msg": ""
}
T_ECHO;
                break;
            case "WeOpen.ConsultClassList":
                return <<<T_ECHO
{
    "ret": 200,
    "data": {
        "code": 1,
        "context": "操作成功！",
        "data": [
            {
                "id": "14", //获取分类列表传的id
                "consultClassName": "中国足球", //分类名称
                "top": "0",
                "status": "1",
                "updateTime": "2017-12-28 16:17:07",
                "createTime": "2017-12-28 16:17:07"
            },
            {
                "id": "13",
                "consultClassName": "国际足球",
                "top": "0",
                "status": "1",
                "updateTime": "2017-12-28 16:16:56",
                "createTime": "2017-12-28 16:16:56"
            },
            {
                "id": "12",
                "consultClassName": "中甲",
                "top": "0",
                "status": "1",
                "updateTime": "2017-12-28 16:16:40",
                "createTime": "2017-12-28 16:16:40"
            },
            {
                "id": "11",
                "consultClassName": "亚冠",
                "top": "0",
                "status": "1",
                "updateTime": "2017-12-28 16:16:30",
                "createTime": "2017-12-28 16:16:30"
            },
            {
                "id": "10",
                "consultClassName": "意甲",
                "top": "0",
                "status": "1",
                "updateTime": "2017-12-28 16:16:20",
                "createTime": "2017-12-28 16:16:20"
            },
            {
                "id": "9",
                "consultClassName": "法甲",
                "top": "0",
                "status": "1",
                "updateTime": "2017-12-28 16:16:06",
                "createTime": "2017-12-28 16:16:06"
            },
            {
                "id": "8",
                "consultClassName": "德甲",
                "top": "0",
                "status": "1",
                "updateTime": "2017-12-28 16:15:48",
                "createTime": "2017-12-28 16:15:48"
            },
            {
                "id": "7",
                "consultClassName": "西甲",
                "top": "0",
                "status": "1",
                "updateTime": "2017-12-28 16:15:32",
                "createTime": "2017-12-28 16:15:32"
            },
            {
                "id": "6",
                "consultClassName": "CBA",
                "top": "0",
                "status": "1",
                "updateTime": "2017-12-28 16:15:20",
                "createTime": "2017-12-28 16:15:18"
            },
            {
                "id": "5",
                "consultClassName": "俄罗斯世界杯",
                "top": "0",
                "status": "1",
                "updateTime": "2017-12-28 16:14:59",
                "createTime": "2017-12-28 16:14:59"
            },
            {
                "id": "4",
                "consultClassName": "欧冠",
                "top": "0",
                "status": "1",
                "updateTime": "2017-12-28 16:14:48",
                "createTime": "2017-12-28 16:14:48"
            },
            {
                "id": "3",
                "consultClassName": "中超",
                "top": "0",
                "status": "1",
                "updateTime": "2017-12-28 16:06:31",
                "createTime": "2017-12-28 16:06:30"
            },
            {
                "id": "2",
                "consultClassName": "英超",
                "top": "0",
                "status": "1",
                "updateTime": "2017-12-28 16:06:21",
                "createTime": "2017-12-28 16:06:21"
            },
            {
                "id": "1",
                "consultClassName": "NBA",
                "top": "0",
                "status": "1",
                "updateTime": "2017-12-28 15:35:25",
                "createTime": "2017-12-28 15:35:25"
            }
        ]
    },
    "msg": ""
}
T_ECHO;
                break;

            case "WeOpen.ConsultList":
                return <<<T_ECHO
{
    "ret": 200,
    "data": {
        "code": 1,
        "context": "操作成功！",
        "data": [
            {
                "id": "2", //帖子id
                "consultName": "1234", //帖子标题
                "consultImg": "url", //图片路径
                "consultDetail": "345345345", 
                "top": "0",
                "num": "0", //点赞数量
                "classId": "1", //帖子分类
                "authorId": "0", //作者id
                "recommendID": "0", //推荐内容id
                "hot": "0", //是否热门
                "status": "1",
                "updateTime": "2017-12-28 18:05:38", //修改时间
                "createTime": "2017-12-28 18:05:34", //创建时间
                "commentNum": "1" //评论数量 
            },
            {
                "id": "1",
                "consultName": "123",
                "consultImg": "url",
                "consultDetail": "asdfasdfasdf",
                "top": "0",
                "num": "0",
                "classId": "1",
                "authorId": "0",
                "recommendID": "0",
                "hot": "0",
                "status": "1",
                "updateTime": "2017-12-28 17:51:35",
                "createTime": "2017-12-28 17:51:23",
                "commentNum": "2"
            }
        ]
    },
    "msg": ""
}
T_ECHO;
                break;
            case "WeOpen.CommentList":
                return <<<T_ECHO
{
    "ret": 200,
    "data": {
        "code": 1,
        "context": "操作成功！",
        "data": [
            {
                "id": "10", //评论id 点赞要用
                "fid": "1",
                "pid": "0",
                "type": "1",
                "comment": "abc", //评论内容
                "userId": "4",
                "status": "1",
                "updateTime": "2018-01-03 15:52:39",
                "createTime": "2018-01-03 15:52:39",
                "likeNum": "0", //点赞数量
                "haslike": "0", //本人是否点赞
                "nickName": "运动迷", //用户昵称
                "photo": "" //用户头衔
            },
            {
                "id": "9",
                "fid": "1",
                "pid": "0",
                "type": "1",
                "comment": "abc",
                "userId": "4",
                "status": "1",
                "updateTime": "2018-01-03 15:46:16",
                "createTime": "2018-01-03 15:46:16",
                "likeNum": "0",
                "haslike": "0",
                "nickName": "运动迷",
                "photo": ""
            },
            {
                "id": "8",
                "fid": "1",
                "pid": "0",
                "type": "1",
                "comment": "abc",
                "userId": "4",
                "status": "1",
                "updateTime": "2018-01-03 15:45:05",
                "createTime": "2018-01-03 15:45:05",
                "likeNum": "0",
                "haslike": "0",
                "nickName": "运动迷",
                "photo": ""
            }
        ]
    },
    "msg": ""
}
T_ECHO;
                break;
            case "WeOpen.getRecommend":
                return <<<T_ECHO
{
    "ret": 200,
    "data": {
        "code": 1,
        "context": "操作成功！",
        "data": [
            {
                "id": "7",
                "consultName": "q",
                "consultImg": "http://img2.imgtn.bdimg.com/it/u=4066248497,2604413005&fm=27&gp=0.jpg",
                "video": "",
                "consultDetail": "同时，移动支付比例超过九成的省（自治区）增长到11个，支付宝在过去一年中，成为当之无愧的最受欢迎的结算方式之一。\n\n钱包，终于在2017年从许多人的必备品变成了可有可无的东西。\n\n“码”上新生活：扫码时代全面来临\n\n当你扫码用支付宝进行支付的时候，你以为只有你自己在用支付宝吗？当然不是！商家，也是支付宝的用户之一。",
                "top": "0",
                "num": "0",
                "classId": "1",
                "authorId": "0",
                "recommendID": "0",
                "hot": "0",
                "status": "1",
                "updateTime": "2018-01-04 12:05:36",
                "createTime": "2018-01-04 10:24:59",
                "consultAuthorName": "",
                "recommendType": "1" // 1是咨询 2是视频 3是 快讯
            },
            {
                "id": "8",
                "consultName": "wer",
                "consultImg": "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2324816349,1743833351&fm=27&gp=0.jpg",
                "video": "",
                "consultDetail": "同时，移动支付比例超过九成的省（自治区）增长到11个，支付宝在过去一年中，成为当之无愧的最受欢迎的结算方式之一。\n\n钱包，终于在2017年从许多人的必备品变成了可有可无的东西。\n\n“码”上新生活：扫码时代全面来临\n\n当你扫码用支付宝进行支付的时候，你以为只有你自己在用支付宝吗？当然不是！商家，也是支付宝的用户之一。",
                "top": "0",
                "num": "0",
                "classId": "1",
                "authorId": "0",
                "recommendID": "0",
                "hot": "0",
                "status": "1",
                "updateTime": "2018-01-04 12:05:36",
                "createTime": "2018-01-04 10:25:05",
                "consultAuthorName": "",
                "recommendType": "1"
            },
            {
                "id": "9",
                "consultName": "ed",
                "consultImg": "http://img5.imgtn.bdimg.com/it/u=3560498528,2305544035&fm=27&gp=0.jpg",
                "video": "",
                "consultDetail": "同时，移动支付比例超过九成的省（自治区）增长到11个，支付宝在过去一年中，成为当之无愧的最受欢迎的结算方式之一。\n\n钱包，终于在2017年从许多人的必备品变成了可有可无的东西。\n\n“码”上新生活：扫码时代全面来临\n\n当你扫码用支付宝进行支付的时候，你以为只有你自己在用支付宝吗？当然不是！商家，也是支付宝的用户之一。",
                "top": "0",
                "num": "0",
                "classId": "1",
                "authorId": "0",
                "recommendID": "0",
                "hot": "0",
                "status": "1",
                "updateTime": "2018-01-04 12:05:35",
                "createTime": "2018-01-04 10:25:06",
                "consultAuthorName": "",
                "recommendType": "1"
            }
        ]
    },
    "msg": ""
}
T_ECHO;
                break;
            case "WeConsult.bindClassPage":
                return <<<T_ECHO
{
    "ret": 200,
    "data": {
        "data": {
            "hasClass": [ //当前用户的分类
                {
                    "id": "1",
                    "consultClassName": "NBA",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 15:35:25",
                    "createTime": "2017-12-28 15:35:25"
                },
                {
                    "id": "2",
                    "consultClassName": "英超",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:06:21",
                    "createTime": "2017-12-28 16:06:21"
                },
                {
                    "id": "3",
                    "consultClassName": "中超",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:06:31",
                    "createTime": "2017-12-28 16:06:30"
                },
                {
                    "id": "4",
                    "consultClassName": "欧冠",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:14:48",
                    "createTime": "2017-12-28 16:14:48"
                },
                {
                    "id": "5",
                    "consultClassName": "俄罗斯世界杯",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:14:59",
                    "createTime": "2017-12-28 16:14:59"
                }
            ],
            "allClass": [ //全部分类
                {
                    "id": "1",
                    "consultClassName": "NBA",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 15:35:25",
                    "createTime": "2017-12-28 15:35:25"
                },
                {
                    "id": "2",
                    "consultClassName": "英超",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:06:21",
                    "createTime": "2017-12-28 16:06:21"
                },
                {
                    "id": "3",
                    "consultClassName": "中超",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:06:31",
                    "createTime": "2017-12-28 16:06:30"
                },
                {
                    "id": "4",
                    "consultClassName": "欧冠",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:14:48",
                    "createTime": "2017-12-28 16:14:48"
                },
                {
                    "id": "5",
                    "consultClassName": "俄罗斯世界杯",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:14:59",
                    "createTime": "2017-12-28 16:14:59"
                },
                {
                    "id": "6",
                    "consultClassName": "CBA",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:15:20",
                    "createTime": "2017-12-28 16:15:18"
                },
                {
                    "id": "7",
                    "consultClassName": "西甲",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:15:32",
                    "createTime": "2017-12-28 16:15:32"
                },
                {
                    "id": "8",
                    "consultClassName": "德甲",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:15:48",
                    "createTime": "2017-12-28 16:15:48"
                },
                {
                    "id": "9",
                    "consultClassName": "法甲",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:16:06",
                    "createTime": "2017-12-28 16:16:06"
                },
                {
                    "id": "10",
                    "consultClassName": "意甲",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:16:20",
                    "createTime": "2017-12-28 16:16:20"
                },
                {
                    "id": "11",
                    "consultClassName": "亚冠",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:16:30",
                    "createTime": "2017-12-28 16:16:30"
                },
                {
                    "id": "12",
                    "consultClassName": "中甲",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:16:40",
                    "createTime": "2017-12-28 16:16:40"
                },
                {
                    "id": "13",
                    "consultClassName": "国际足球",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:16:56",
                    "createTime": "2017-12-28 16:16:56"
                },
                {
                    "id": "14",
                    "consultClassName": "中国足球",
                    "top": "0",
                    "status": "1",
                    "updateTime": "2017-12-28 16:17:07",
                    "createTime": "2017-12-28 16:17:07"
                }
            ]
        }
    },
    "msg": ""
}
T_ECHO;
                break;
        }
    }
}